home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / ServerCloneException.java < prev    next >
Text File  |  1998-09-22  |  1KB  |  50 lines

  1. /*
  2.  * @(#)ServerCloneException.java    1.3 98/07/01
  3.  *
  4.  * Copyright 1995-1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  * 
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.rmi.server;
  16.  
  17. public class ServerCloneException extends CloneNotSupportedException {
  18.  
  19.     public Exception detail;
  20.     
  21.     /**
  22.      * Create A remote exception with the specified string
  23.      */
  24.     public ServerCloneException(String s) {
  25.     super(s);
  26.     }
  27.  
  28.     /**
  29.      * Create A remote exception with the specified string, and the
  30.      * exception specified.
  31.      */
  32.     public ServerCloneException(String s, Exception ex) {
  33.     super(s);
  34.     detail = ex;
  35.     }
  36.  
  37.     /**
  38.      * Produce the message, include the message from the nested
  39.      * exception if there is one.
  40.      */
  41.     public String getMessage() {
  42.     if (detail == null) 
  43.         return super.getMessage();
  44.     else
  45.         return super.getMessage() + 
  46.         "; nested exception is: \n\t" +
  47.         detail.toString();
  48.     }
  49. }
  50.